package com.ruoyi.common.web.exception;

import com.ruoyi.common.enums.BizCodeEnum;
import lombok.Data;

//自定义全局异常
@Data
public class BizException extends RuntimeException{

    private int code;

    private String msg;

    public BizException(BizCodeEnum bizCodeEnum){
        super(bizCodeEnum.getMessage());
        this.code = bizCodeEnum.getCode();
        this.msg = bizCodeEnum.getMessage();
    }


}
